<template>
  <div>
    <div class="video_main">
      <div class="main_box">
        <div class="img_box">
          <a
            @click="play"
            class="img_a video_btn"
            href="#"
          >
            <img
              src="./img/026b2903ba.jpg"
              alt=""
            >
          </a>
        </div>
        <div class="text">
          <a
            class="video_title"
            href="#"
          >Comfort and warmth in the back</a>
          <div class="line"></div>
          <span class="video_content">Lounger tent, gezellige tent voor bruiloften en feesten
            De Lounger XL heeft een</span>
          <a
            class="view_all"
            href="#"
          >Read More&nbsp;&nbsp;&nbsp;&nbsp;></a>
        </div>
      </div>
    </div>
    <div v-if="fun">
      <video
        class="vid"
        controls
        autoplay
        width="800"
        height="500"
      >
        <source
          src="/media/cc0-videos/flower.webm"
          type="video/webm"
        >
      </video>
      <a
        @click="cancel"
        href="#"
        class="close_btn middleImg"
      >
        <img
          src="./img/close_btn.png"
          alt=""
        >
      </a>
    </div>
  </div>
</template>
<script>
export default {
  data: () => ({
    fun: false
  }),
  methods: {
    play() {
      this.fun = !this.fun
    },
    cancel() {
      this.fun = false
    }
  }
}
</script>
<style lang="scss" scoped>
.video_main {
  position: relative;
  width: 100%;
}
@media screen and (max-width: 768px)
#video .video_main {
    padding-bottom: 5%;
}
.video_main::before {
  content: "";
  display: block;
  width: 68%;
  position: absolute;
  z-index: -1;
  height: 100%;
  background-color: #132305;
  right: 0;
  top: 0;
}
.video_main .main_box {
  padding: 2.2% 0;
  display: flex;
}
.video_main .main_box .img_box {
  float: left;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 55.6%;
  max-width: 1040px;
}
.video_main .main_box .img_a {
  display: block;
  position: relative;
  overflow: hidden;
}
.video_main .main_box .img_a:hover img {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}
.video_main .main_box .img_a img {
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}
.video_main .main_box .img_a:before {
  display: block;
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5.8125rem;
  height: 5.8125rem;
  border: 2px solid #fff;
  background: url(./img/play_icon.png) no-repeat center;
  background-size: 22.5px 22.5px;
  z-index: 1;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
img {
  max-width: 100%;
  max-height: 100%;
  border: none;
}
.video_main .main_box .text {
  float: left;
  width: 27%;
  margin: 8.75% 12.6% 0 6.57%;
}
.video_main .main_box .text .video_title {
  display: block;
  font-size: 3rem;
  line-height: 3.4375rem;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
}
.text a {
  display: block;
  color: #555;
  margin-top: 10px;
}
.video_main .main_box .text .line {
  width: 21.5%;
  background-color: #ffffff;
  height: 0.1875rem;
  margin: 30px 0;
}
.video_main .main_box .text .video_content {
  font-size: 1.125rem;
  line-height: 35px;
  color: #e9eae9;
  font-family: "Segma-Regular";
}
.video_main .main_box .text .view_all {
  display: block;
  color: #ffffff;
  margin-top: 20%;
}
.vid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 9;
}
.close_btn {
  z-index: 10;
  position: absolute;
  right: 18.25rem;
  top: 12.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.5625rem;
  height: 1.5625rem;
  background: #fff;
  text-align: center;
  -webkit-border-radius: 50%;
  border-radius: 50%;
}
</style>